import axios from "axios"

const state = {
    apiList: []
}

const mutations = {
    APILSIT(state, payload) {
        setTimeout(() => {
            state.apiList = payload
        }, 300);
    }
}

const actions = {
    getApiList(store) {
        axios.get("https://api.apiopen.top/videoHomeTab").then(res => {
            if(res.data.code === 200) {
                store.commit("APILSIT", res.data.result)
            }
        })
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}